package collatz;

public class CollatzThread implements Runnable{
	private DefaultCollatz collatz;
	private long numbers[];
	private int start;
	private int end;

	public CollatzThread(long numbers[], int start, int end){
		collatz = new DefaultCollatz();
		this.start = start;
		this.end = end;
		this.numbers = numbers;

	}

	@Override
	public void run() {

		for(int i = start ; i <= end ; i++){
			if(i >= numbers.length)
				break;

			collatz.collatz(numbers[i]);	
		}
	}



}